package com.cuotigou.util;

import org.slf4j.Logger;

import java.io.PrintWriter;
import java.io.StringWriter;


/**
 * Created by Administrator on 2018/11/7.
 */
public class ExceptionUtil {
    /**
     * 异常日志
     * @param e
     * @param log
     */
    public static void logError(Exception e, Logger log){
        StringWriter sw=new StringWriter();
        e.printStackTrace(new PrintWriter(sw,true));
        log.error("异常详细信息:"+sw.toString());
    }
}
